home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / X11R4 / cmds / X / ddx / Xmfbpmax / machine / pmioctl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-24  |  4.1 KB  |  110 lines

  1.  
  2. /*
  3.  *    @(#)pmioctl.h    "@(#)pmioctl.h    4.5    (ULTRIX)    11/17/88    ";
  4.  */
  5.  
  6. /************************************************************************
  7.  *                                    *
  8.  *            Copyright (c) 1986, 1987 by            *
  9.  *        Digital Equipment Corporation, Maynard, MA        *
  10.  *            All rights reserved.                *
  11.  *                                    *
  12.  *   This software is furnished under a license and may be used and    *
  13.  *   copied  only  in accordance with the terms of such license and    *
  14.  *   with the  inclusion  of  the  above  copyright  notice.   This    *
  15.  *   software  or  any  other copies thereof may not be provided or    *
  16.  *   otherwise made available to any other person.  No title to and    *
  17.  *   ownership of the software is hereby transferred.            *
  18.  *                                    *
  19.  *   This software is  derived  from  software  received  from  the    *
  20.  *   University    of   California,   Berkeley,   and   from   Bell    *
  21.  *   Laboratories.  Use, duplication, or disclosure is  subject  to    *
  22.  *   restrictions  under  license  agreements  with  University  of    *
  23.  *   California and with AT&T.                        *
  24.  *                                    *
  25.  *   The information in this software is subject to change  without    *
  26.  *   notice  and should not be construed as a commitment by Digital    *
  27.  *   Equipment Corporation.                        *
  28.  *                                    *
  29.  *   Digital assumes no responsibility for the use  or  reliability    *
  30.  *   of its software on equipment which is not supplied by Digital.    *
  31.  *                                    *
  32.  ************************************************************************/
  33.  
  34. #ifdef KERNEL
  35. #include "../../mips/mips/pmevent.h"
  36. #include "../h/ioctl.h"
  37. #include "../../mips/mips/pmreg.h"
  38. #else
  39. #include "pmevent.h"
  40. #include <sys/ioctl.h>
  41. #include "pmreg.h"
  42. #endif
  43.  
  44. struct pm_kpcmd {
  45.     char nbytes;        /* number of bytes in parameter */
  46.     unsigned char cmd;    /* command to be sent, peripheral bit will */
  47.                 /* be forced by driver */
  48.     unsigned char par[2];    /* bytes of parameters to be sent */
  49. };
  50.  
  51. typedef struct pm_info {
  52.     pmEventQueue qe;        /* event & motion queues    */
  53.     short    mswitches;        /* current value of mouse buttons */
  54.     pmCursor tablet;        /* current tablet position    */
  55.     short    tswitches;        /* current tablet buttons NI!    */
  56.     pmCursor cursor;        /* current cursor position    */
  57.     short    row;            /* screen row            */
  58.     short    col;            /* screen col            */
  59.     short    max_row;        /* max character row        */
  60.     short    max_col;        /* max character col        */
  61.     short    max_x;            /* max x position        */
  62.     short    max_y;            /* max y position        */
  63.     short    max_cur_x;        /* max cursor x position     */
  64.     short    max_cur_y;        /* max cursor y position    */
  65.     int    version;        /* version of driver        */
  66.     char    *bitmap;        /* bit map position        */
  67.         short   *scanmap;               /* scanline map position        */
  68.     short    *cursorbits;        /* cursor bit position        */
  69.     short    *pmaddr;        /* virtual address               */
  70.     char    *planemask;        /* plane mask virtual location  */
  71.     pmCursor mouse;            /* atomic read/write        */
  72.     pmBox    mbox;            /* atomic read/write        */
  73.     short    mthreshold;        /* mouse motion parameter    */
  74.     short    mscale;            /* mouse scale factor (if 
  75.                        negative, then do square).    */
  76.     short    min_cur_x;        /* min cursor x position    */
  77.     short    min_cur_y;        /* min cursor y position    */
  78. } PM_Info;
  79.  
  80. typedef struct _ColorMap {
  81.     short  Map;
  82.     unsigned short index;
  83.     struct {
  84.         unsigned short red;
  85.         unsigned short green;
  86.         unsigned short blue;
  87.     } Entry;
  88. } ColorMap;
  89.  
  90. #ifndef sprite
  91. /*
  92.  * CAUTION:
  93.  *    The numbers of these ioctls must match
  94.  *    the ioctls in qvioctl.h
  95.  */
  96. #define QIOCGINFO     _IOR(q, 1, struct pm_info *)    /* get the info     */
  97. #define QIOCPMSTATE    _IOW(q, 2, pmCursor)        /* set mouse pos */
  98. #define    QIOWCURSORCOLOR    _IOW(q, 3, unsigned int [6])    /* bg/fg r/g/b */
  99. #define QIOCINIT    _IO(q, 4)            /* init screen   */
  100. #define QIOCKPCMD    _IOW(q, 5, struct pm_kpcmd)    /* keybd. per. cmd */
  101. #define QIOCADDR    _IOR(q, 6, struct pm_info *)    /* get address */
  102. #define    QIOWCURSOR    _IOW(q, 7, short[32])    /* write cursor bit map */
  103. #define QIOKERNLOOP    _IO(q, 8)   /*re-route kernel console output */
  104. #define QIOKERNUNLOOP    _IO(q, 9)   /*don't re-route kernel console output */
  105. #define QIOVIDEOON    _IO(q, 10)            /* turn on the video */
  106. #define    QIOVIDEOOFF    _IO(q, 11)            /* turn off the video */
  107. #define QIOSETCMAP      _IOW(q, 12, ColorMap)
  108. #define    QD_KERN_UNLOOP    _IO(g, 21)    /* RESERVED for DIGITAL, DON'T CHANGE */
  109. #endif
  110.